curl --request PUT \
--url https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Heavy or Oversized",
"sort_order": 15,
"conditions": {
"or": [
{
"and": [
{
">=": [
{
"var": "weight"
},
{
"value": 70,
"unit": "lb"
}
]
}
]
},
{
"and": [
{
"contains_any": [
{
"var": "product_profiles"
},
[
31
]
]
}
]
}
]
}
}
'import requests
url = "https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id}"
payload = {
"name": "Heavy or Oversized",
"sort_order": 15,
"conditions": { "or": [{ "and": [{ ">=": [
{ "var": "weight" },
{
"value": 70,
"unit": "lb"
}
] }] }, { "and": [{ "contains_any": [{ "var": "product_profiles" }, [31]] }] }] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Heavy or Oversized',
sort_order: 15,
conditions: {
or: [
{and: [{'>=': [{var: 'weight'}, {value: 70, unit: 'lb'}]}]},
{and: [{contains_any: [{var: 'product_profiles'}, [31]]}]}
]
}
})
};
fetch('https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Heavy or Oversized',
'sort_order' => 15,
'conditions' => [
'or' => [
[
'and' => [
[
'>=' => [
[
'var' => 'weight'
],
[
'value' => 70,
'unit' => 'lb'
]
]
]
]
],
[
'and' => [
[
'contains_any' => [
[
'var' => 'product_profiles'
],
[
31
]
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id}"
payload := strings.NewReader("{\n \"name\": \"Heavy or Oversized\",\n \"sort_order\": 15,\n \"conditions\": {\n \"or\": [\n {\n \"and\": [\n {\n \">=\": [\n {\n \"var\": \"weight\"\n },\n {\n \"value\": 70,\n \"unit\": \"lb\"\n }\n ]\n }\n ]\n },\n {\n \"and\": [\n {\n \"contains_any\": [\n {\n \"var\": \"product_profiles\"\n },\n [\n 31\n ]\n ]\n }\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Heavy or Oversized\",\n \"sort_order\": 15,\n \"conditions\": {\n \"or\": [\n {\n \"and\": [\n {\n \">=\": [\n {\n \"var\": \"weight\"\n },\n {\n \"value\": 70,\n \"unit\": \"lb\"\n }\n ]\n }\n ]\n },\n {\n \"and\": [\n {\n \"contains_any\": [\n {\n \"var\": \"product_profiles\"\n },\n [\n 31\n ]\n ]\n }\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Heavy or Oversized\",\n \"sort_order\": 15,\n \"conditions\": {\n \"or\": [\n {\n \"and\": [\n {\n \">=\": [\n {\n \"var\": \"weight\"\n },\n {\n \"value\": 70,\n \"unit\": \"lb\"\n }\n ]\n }\n ]\n },\n {\n \"and\": [\n {\n \"contains_any\": [\n {\n \"var\": \"product_profiles\"\n },\n [\n 31\n ]\n ]\n }\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"type": "parameters",
"message": "The supplied parameters are invalid."
}
]
}{
"errors": [
{
"type": "not_found",
"message": "The server could not find the requested resource."
}
]
}{
"errors": [
{
"type": "unable_to_process",
"message": "There was an error processing the request."
}
]
}Update Handling Class
Partially updates a Handling Class. code is immutable and is not accepted. Changes to
conditions, sort order, or Warehouse assignments schedule asynchronous reclassification
after commit.
On success, the endpoint returns 200 OK with an empty response body.
curl --request PUT \
--url https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Heavy or Oversized",
"sort_order": 15,
"conditions": {
"or": [
{
"and": [
{
">=": [
{
"var": "weight"
},
{
"value": 70,
"unit": "lb"
}
]
}
]
},
{
"and": [
{
"contains_any": [
{
"var": "product_profiles"
},
[
31
]
]
}
]
}
]
}
}
'import requests
url = "https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id}"
payload = {
"name": "Heavy or Oversized",
"sort_order": 15,
"conditions": { "or": [{ "and": [{ ">=": [
{ "var": "weight" },
{
"value": 70,
"unit": "lb"
}
] }] }, { "and": [{ "contains_any": [{ "var": "product_profiles" }, [31]] }] }] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Heavy or Oversized',
sort_order: 15,
conditions: {
or: [
{and: [{'>=': [{var: 'weight'}, {value: 70, unit: 'lb'}]}]},
{and: [{contains_any: [{var: 'product_profiles'}, [31]]}]}
]
}
})
};
fetch('https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Heavy or Oversized',
'sort_order' => 15,
'conditions' => [
'or' => [
[
'and' => [
[
'>=' => [
[
'var' => 'weight'
],
[
'value' => 70,
'unit' => 'lb'
]
]
]
]
],
[
'and' => [
[
'contains_any' => [
[
'var' => 'product_profiles'
],
[
31
]
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id}"
payload := strings.NewReader("{\n \"name\": \"Heavy or Oversized\",\n \"sort_order\": 15,\n \"conditions\": {\n \"or\": [\n {\n \"and\": [\n {\n \">=\": [\n {\n \"var\": \"weight\"\n },\n {\n \"value\": 70,\n \"unit\": \"lb\"\n }\n ]\n }\n ]\n },\n {\n \"and\": [\n {\n \"contains_any\": [\n {\n \"var\": \"product_profiles\"\n },\n [\n 31\n ]\n ]\n }\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Heavy or Oversized\",\n \"sort_order\": 15,\n \"conditions\": {\n \"or\": [\n {\n \"and\": [\n {\n \">=\": [\n {\n \"var\": \"weight\"\n },\n {\n \"value\": 70,\n \"unit\": \"lb\"\n }\n ]\n }\n ]\n },\n {\n \"and\": [\n {\n \"contains_any\": [\n {\n \"var\": \"product_profiles\"\n },\n [\n 31\n ]\n ]\n }\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{base_url_domain}/api/global/v1/inventory/handling-classes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Heavy or Oversized\",\n \"sort_order\": 15,\n \"conditions\": {\n \"or\": [\n {\n \"and\": [\n {\n \">=\": [\n {\n \"var\": \"weight\"\n },\n {\n \"value\": 70,\n \"unit\": \"lb\"\n }\n ]\n }\n ]\n },\n {\n \"and\": [\n {\n \"contains_any\": [\n {\n \"var\": \"product_profiles\"\n },\n [\n 31\n ]\n ]\n }\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"type": "parameters",
"message": "The supplied parameters are invalid."
}
]
}{
"errors": [
{
"type": "not_found",
"message": "The server could not find the requested resource."
}
]
}{
"errors": [
{
"type": "unable_to_process",
"message": "There was an error processing the request."
}
]
}Authorizations
Generate a JWT access token through a Custom Global Integration and provide it with each request in the Authorization header prefixed with "Bearer" and then a single space.
Path Parameters
Handling Class ID.
x >= 114
Body
Human-readable Handling Class name.
1 - 255"Heavy and Oversized"
Evaluation precedence within every selected Warehouse.
0 <= x <= 100000025
Complete replacement Warehouse set. An empty array is never accepted: a class emptied by a Warehouse deletion must be given a new Warehouse set here, or be deleted.
1A reference to a Warehouse by id.
Show child attributes
Show child attributes
A one-level OR-of-AND condition tree. The server accepts the {"and": [...]} shorthand
for a single group and always returns the canonical {"or": [{"and": [...]}]} form.
OpenAPI validates the structural envelope. ShipStream remains authoritative for available
Product fields, field/operator compatibility, option values, measurement units, raw CEL
validity, normalization, the limit of 64 condition rows across all groups, and the
65,535-byte compiled-expression limit. Editor clients can
load the applicable Product field catalogue from
GET /api/global/v1/inventory/product-profiles/condition-fields or
GET /api/global/v1/inventory/handling-classes/condition-fields.
- Option 1
- Option 2
Show child attributes
Show child attributes
{
"or": [
{
"and": [
{
"<=": [
{ "var": "weight" },
{ "value": 15, "unit": "lb" }
]
}
]
}
]
}
Response
OK - The operation completed successfully and there is no response body.
Was this page helpful?